home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / Apps / DevTools / CrashTrap.v1.0 / Source / AppDelegate.m < prev    next >
Encoding:
Text File  |  1995-06-12  |  762 b   |  49 lines

  1. //
  2. //  Demo for HKCrashTrap
  3. //
  4. // By ivo  ivo@hasc.ca
  5.  
  6. #import "AppDelegate.h"
  7. #import "HKCrashTrap.h"
  8.  
  9. @implementation AppDelegate
  10.  
  11. - appDidInit:sender
  12. {
  13.     [window makeKeyAndOrderFront:self];
  14.     return self;
  15. }
  16.  
  17. - afterCrashMatrixHit:sender
  18. {
  19.     [HKCrashTrap setContinueAfterError:([[sender selectedCell] tag]?NO:YES)];
  20.     return self;
  21. }
  22.  
  23. - nullCrashHit:sender;
  24. {
  25.     char *p = NULL;
  26.     fprintf(stderr,"About to crash referencing a NULL ptr.\n");
  27.     *p = 1;
  28.     return self;
  29. }
  30.  
  31. - unimplementedCrashHit:sender;
  32. {
  33. #warning The following 'does not repond to' warning is intentional! 
  34.     [self callSomethingNotImplemented];   // Make me crash!!!
  35.     return self;
  36. }
  37.  
  38. - freedObjectCrashHit:sender;
  39. {
  40.     id o;
  41.     
  42.     o = [[Object alloc] init];
  43.     [o free];
  44.     [o hash];
  45.     return self;
  46. }
  47.  
  48. @end
  49.